home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 14214 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.1 KB

  1. Path: yama.mcc.ac.uk!dmu!usenet
  2. From: Graham Perkins <grp@dmu.ac.uk>
  3. Newsgroups: comp.lang.eiffel,comp.lang.c,comp.lang.c++,comp.object,comp.software-eng
  4. Subject: Re: Portability of code & skills (Beware of "C" Hackers etc)
  5. Date: Wed, 27 Mar 1996 13:14:46 +0000
  6. Organization: De Montfort University
  7. Message-ID: <31593F46.3FAC@dmu.ac.uk>
  8. References: <31494D29.4D4B@dmu.ac.uk> <DoG3HE.48E@assip.csasyd.oz>     <31517E6F.5930@dmu.ac.uk> <DooBwC.8C0@world.std.com> <65O34-3-3RB@herold.franken.de> <4j8177$18ma@saba.info.ucla.edu>
  9. NNTP-Posting-Host: mkcsst22.mk.dmu.ac.uk
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0 (Win16; I)
  14.  
  15. Jay Martin wrote:
  16.  
  17. [re: passing local proc/fn as parameter in Pascal]
  18. > This is what I call side-effects on a global variable (or variable of
  19. > a larger scope).  Its not what I call good programming practice.  In
  20. > fact, I see nested procedures as implemented in algol block languages
  21. > (automatic importation of variables from larger scopes) as another
  22. > stupid idea of CS.
  23.  
  24. I was originally suggesting that there are some powerful concepts in
  25. various languages and other paradigms that transfer very awkwardly
  26. or not at all into the C language.  While I do not believe that programmers
  27. who work with C are necessarily hackers, I would maintain that without
  28. significant exposure to other languages they will unknowingly be locked
  29. into a poverty of expression.
  30.  
  31. That particular Pascal feature can of course be abused just like any other.
  32. But if you have done some functional programming and made use of function
  33. parameters and curried functions, you will find it possible to design some
  34. tasks according to that paradigm and use the local functions to simulate
  35. currying.
  36.  
  37. If that's not your cup of tea, then don't bother.  But the point remains: a
  38. powerful concept is directly provided by some languages and supportable in
  39. others.  But not C.
  40.  
  41. -- 
  42. person: Graham Perkins         paper: School of Computing
  43. voice:  +44 (0)1908 834936            De Montfort University
  44. dots:   +44 (0)1908 834948            Milton Keynes MK7 6HP
  45. bits:   grp@dmu.ac.uk                 United Kingdom
  46.